package com.demo.gulimall.order.entity;

import java.util.Date;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.*;
import java.io.Serializable;
import lombok.experimental.Accessors;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;

/**
 * 支付信息表
 *
 * @author Chen Yuan
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
@TableName("oms_payment_info")
public class PaymentInfo implements Serializable {
	/** id */
	@TableId(type = IdType.ID_WORKER) // 老版本
    //@TableId(type = IdType.ASSIGN_ID) // 新版本
	@JsonSerialize(using = ToStringSerializer.class)
	@TableField(value = "`id`")
	private Long id;

	/** 订单号（对外业务号） */
	@TableField(value = "`order_sn`")
	private String orderSn;

	/** 订单id */
	@JsonSerialize(using = ToStringSerializer.class)
	@TableField(value = "`order_id`")
	private Long orderId;

	/** 支付宝交易流水号 */
	@TableField(value = "`alipay_trade_no`")
	private String alipayTradeNo;

	/** 支付总金额 */
	@TableField(value = "`total_amount`")
	private BigDecimal totalAmount;

	/** 交易内容 */
	@TableField(value = "`subject`")
	private String subject;

	/** 支付状态 */
	@TableField(value = "`payment_status`")
	private String paymentStatus;

	/** 创建时间 */
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="Asia/Shanghai")
	@TableField(value = "`create_time`")
	private Date createTime;

	/** 确认时间 */
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="Asia/Shanghai")
	@TableField(value = "`confirm_time`")
	private Date confirmTime;

	/** 回调内容 */
	@TableField(value = "`callback_content`")
	private String callbackContent;

	/** 回调时间 */
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="Asia/Shanghai")
	@TableField(value = "`callback_time`")
	private Date callbackTime;

}
